package com.tz.crm.entity.dto;

import com.tz.crm.entity.*;
import com.tz.crm.entity.Payment;
import com.tz.crm.entity.enumeration.Gender;
import com.tz.crm.entity.enumeration.Title;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Set;

/**
 * Created by wangchunyang on 2017/3/7.
 *  合同信息传输类
 */
public class Contract extends BaseEntity {

    @NotBlank(message = "{templateId.can.not.be.blank}")
    String templateId;
    @NotBlank(message = "{inNum.can.not.be.blank}")
    String inNum;//公司合同号
    String exNum;//客户定单号
    @NotBlank(message = "{customer.can.not.be.blank}")
    String customerName;//公司名称
    @NotBlank(message = "{signDate.can.not.be.blank}")
    String signDate;//签约日期
    //@Size(min = 1, message = "{amount.can.not.be.blank}")
    @Pattern(regexp = "[0-9]{1,14}(\\.{0,1}[0-9]{1,2})?", message = "{amount.can.not.be.blank}")
    String amount;//金额
    @NotBlank(message = "{signUser.can.not.be.blank}")
    String signUserName;//合约签署人
    String startDate;//合同起始日
    String endDate;//合同结束日
    String remark;//备注
    Set<Payment> payPlan;//付款计划
    Set<PropertyValue> propertyValueSet;

    public Contract() {

    }

    public String getTemplateId() {
        return templateId;
    }

    public void setTemplateId(String templateId) {
        this.templateId = templateId;
    }

    public String getInNum() {
        return inNum;
    }

    public void setInNum(String inNum) {
        this.inNum = inNum;
    }

    public String getExNum() {
        return exNum;
    }

    public void setExNum(String exNum) {
        this.exNum = exNum;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getSignDate() {
        return signDate;
    }

    public void setSignDate(String signDate) {
        this.signDate = signDate;
    }

    public String getAmount() {
        return amount;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public String getSignUserName() {
        return signUserName;
    }

    public void setSignUserName(String signUserName) {
        this.signUserName = signUserName;
    }

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Set<Payment> getPayPlan() {
        return payPlan;
    }

    public void setPayPlan(Set<Payment> payPlan) {
        this.payPlan = payPlan;
    }

    public Set<PropertyValue> getPropertyValueSet() {
        return propertyValueSet;
    }

    public void setPropertyValueSet(Set<PropertyValue> propertyValueSet) {
        this.propertyValueSet = propertyValueSet;
    }

    @Override
    public String toString() {
        return "Contract{" +
                "templateId='" + templateId + '\'' +
                ", inNum='" + inNum + '\'' +
                ", exNum='" + exNum + '\'' +
                ", customerName='" + customerName + '\'' +
                ", signDate='" + signDate + '\'' +
                ", amount='" + amount + '\'' +
                ", signUserName='" + signUserName + '\'' +
                ", startDate='" + startDate + '\'' +
                ", endDate='" + endDate + '\'' +
                ", remark='" + remark + '\'' +
                ", payPlan=" + payPlan +
                ", propertyValueSet=" + propertyValueSet +
                '}';
    }
}
